﻿<Application
    x:Class="SmartPatientCentre.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SmartPatientCentre"
    xmlns:common="using:SmartPatientCentre.Common"
    RequestedTheme="Light">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- TODO -->
            </ResourceDictionary.MergedDictionaries>

            <!-- Add App-Level Resources here -->

            <!-- Patient Tile DataTemplate -->
            <DataTemplate x:Key="PatientTile">
                <Grid HorizontalAlignment="Left" Width="300">
                    <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Background="#FFEEEEEE">
                        <Border Background="{Binding GenderColor}" Height="100" Width="100">
                            <TextBlock Text="{Binding Initials}" Style="{StaticResource HeaderTextBlockStyle}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" />
                        </Border>
                        <StackPanel Width="200" VerticalAlignment="Center">
                            <TextBlock Text="{Binding FullName}" HorizontalAlignment="Center" FontWeight="Bold"/>
                            <TextBlock Text="{Binding Ward}" HorizontalAlignment="Center"/>
                            <TextBlock Text="{Binding RoomBed}" HorizontalAlignment="Center"/>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </DataTemplate>

            <!-- Result Tile DataTemplate  -->
            <DataTemplate x:Key="ResultTile">
                <Grid Width="300" Height="100" Background="{Binding TileBackground}" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="70"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="100"/>
                    </Grid.ColumnDefinitions>

                    <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" >
                        <TextBlock Text="{Binding ResultType}" Style="{StaticResource BaseTextBlockStyle}" FontWeight="SemiBold" TextAlignment="Center" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="10" />
                    </Grid>

                    <Grid Grid.Row="0" Grid.Column="2">
                        <TextBlock Text="{Binding ShortDate}" Style="{StaticResource BaseTextBlockStyle}" TextAlignment="Center" />
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="0">
                        <Image Source="{Binding Sign}" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="1">
                        <TextBlock Text="{Binding ValueString}" Style="{StaticResource HeaderTextBlockStyle}" Height="40" HorizontalAlignment="Center" />
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="2">
                        <TextBlock Text="{Binding DifferenceString}" Style="{StaticResource BaseTextBlockStyle}" TextAlignment="Center" VerticalAlignment="Bottom" Padding="0,0,0,10" />
                    </Grid>

                </Grid>
            </DataTemplate>

        </ResourceDictionary>
    </Application.Resources>

</Application>
